using System;
using System.Collections.Generic;

namespace QUAN_LY_NGAN_HANG_CAU_HOI_TRAC_NGHIEM
{
    public class TaoCauHoiPresenter
    {
        public void InsertCauHoiVaDapAn(CauHoiDAL cauhoi, List<DapAnDAL> lst)
        {
            Guid macauhoi = CauHoiBUS.InsertCauHoi(cauhoi);
            if (macauhoi != Guid.Empty)
            {
                for (int i = 0; i < lst.Count; i++)
                {
                    DapAnDAL dapan = new DapAnDAL();
                    dapan = lst[i];
                    dapan.MaSoCauHoi = macauhoi;
                    DapAnDAL.InsertDapAn(dapan);
                }
            }
        }

        public LinhVucBUS[] ListLinhVucTheoGiaoVien(Guid maGV)
        {
            return LinhVucBUS.ListLinhVucTheoGiaoVien(maGV);
        }

        public MucDoBUS[] ListMucDo()
        {
            return MucDoBUS.ListMucDo();
        }
    }
}